package com.atcumt.bytedance;

import java.util.Scanner;

public class Main05 {

//    static double P = 3.1415927;
    static double P = Math.PI;

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();

        int[] nums = new int[N];
        for (int i = 0; i < N; i++) {
            nums[i] = scanner.nextInt();
        }

        int[] res = new int[N];
        for (int i = 0; i < N; i++) {
            res[i] = solve(nums[i], i, N);
        }

        for (int i = 0; i < N; i++) {
            System.out.print(res[i] + " ");
        }
    }

    private static int solve(int num, int n, int N) {
        double res = num * 0.5 * (1 - Math.cos(2 * P * n / N));
        res = Math.round(res);
        return (int) res;
    }
}
